package com.hqyj.pojo;

import com.baomidou.mybatisplus.annotation.IdType;

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author rock
 * @since 2021-10-20
 */
@Data
@TableName("employee_contract")
public class EmployeeContract extends MyPage implements Serializable {

    private static final long serialVersionUID=1L;

    @TableId(value = "contract_id", type = IdType.AUTO)
    private Integer contractId;
    @TableField(value = "employee_id")
    private Integer employeeId;
    private Object contractStartDate;
    private Object contractEndDate;

    public String getcontractStartDate() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        if(this.contractStartDate!=null){
            return sdf.format(this.contractStartDate);
        }
        return "";
    }

    public void setcontractStartDate(String contractStartDate) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

        try {
            this.contractStartDate = sdf.parse(contractStartDate);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
    public String getcontractEndDate() {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        if(this.contractEndDate!=null){
            return sdf.format(this.contractEndDate);
        }
        return "";
    }

    public void setcontractEndDate(String contractEndDate) {
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");

        try {
            this.contractEndDate = sdf.parse(contractEndDate);
        } catch (ParseException e) {
            e.printStackTrace();
        }
    }
    @TableField(value = "post")
    private String post;
    @TableField(value = "contract_content")
    private String contractContent;
    @TableField(value = "remarks")
    private String remarks;



}
